#pragma strict
var health = 3;

function OnTriggerEnter(other: Collider){
	if(other.tag == "PlayerBullet"){
		var PlayerFires: PlayerFires = GameObject.Find("ShipPrefab").GetComponent(PlayerFires);
		PlayerFires.fires = true;
	}
	Destroy(other.gameObject);
	if (health >0){
		health --;
	}
	else {
		Destroy(gameObject);
	}
}